﻿CREATE PROCEDURE [ServiceEngine].[ListSystemInstancesForSystem]
	@SystemID uniqueidentifier
AS
BEGIN
	SET NOCOUNT ON;

	SELECT	N.[EntityID] as SystemInstanceID, N.[EntityName] as [Name], N.EntityDescription as Description
	FROM	[ServiceEngine].SystemInstances SI
	JOIN	[ServiceEngine].Names N on N.[EntityID] = SI.InstanceID and N.[EntityTypeID] = 14
	WHERE	SI.SystemID = @SystemID

END